<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/userBusiness/">信息列表</a></li>
		<%--<shiro:hasPermission name="sys:userBusiness:edit"><li><a href="${ctx}/sys/userBusiness/form">信息添加</a></li></shiro:hasPermission>--%>
	</ul>
    <ul class="ul-form">
	<form:form id="searchForm" modelAttribute="userBusiness" action="${ctx}/sys/userBusiness/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
         <li> <label>商家商城:</label>&nbsp;&nbsp;
                <form:select path="businessType" class="input-xlarge" id="sel" onchange="mySel()">
                    <form:option value="" label="请选择"/>
                    <form:options items="${fns:getDictList('business_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                </form:select></li>&nbsp;&nbsp;&nbsp;&nbsp;

			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
                <th>商家名</th>
                <th>介绍</th>
                <th>消费均价</th>
				<th>联系电话</th>
				<th>手机</th>
				<th>邮箱</th>
				<shiro:hasPermission name="sys:userBusiness:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>

		<c:forEach items="${page.list}" var="userBusiness">
			<tr>
            <td>${userBusiness.name}</td>
            <td>${userBusiness.introduce}</td>
            <td>${userBusiness.price}</td>
				<td>${userBusiness.user.phone}</td>
				<td>${userBusiness.user.mobile}</td>
				<td>${userBusiness.user.email}</td>
				<shiro:hasPermission name="sys:userBusiness:edit"><td>
    				<%--<a href="${ctx}/sys/userBusiness/form?id=${userBusiness.id}">修改</a>--%>
					<a href="${ctx}/sys/userBusiness/delete?id=${userBusiness.id}" onclick="return confirmx('确认要删除该信息吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>